package thread;

import java.nio.channels.Pipe;

public class testDemo25 {
    public static void main(String[] args) {
        //工厂模式模拟
        Point point=Point.makePointXY(1,2);
        System.out.println(point.makePointXY(1,2));
    }
}
class Point{
    public double set(double i){
        return i;
    }
    public static Point makePointXY(double x,double y){
        Point p=new Point();
        p.set(x);
        p.set(y);
        return p;
    }
    public static Point makePointAR(double A,double R){
        Point p1=new Point();
        p1.set(A);
        p1.set(R);
        return p1;
    }
}
